﻿<UserControl x:Class="S2Snext.GUI.Dialogs.ModalDialog"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Dialogs="clr-namespace:S2Snext.GUI.Dialogs" x:Name="root">

	<Grid DataContext="{Binding ElementName=root}" >
		<Border Background="#90535353" Visibility="{Binding Visibility}">
			<Border BorderBrush="Black" BorderThickness="1" Opacity="0.8" Name="DialogWin" Background="#FFD0D4DB" 
					CornerRadius="10,0,10,0" VerticalAlignment="Center"
					HorizontalAlignment="Center">
				<Border.BitmapEffect>
					<DropShadowBitmapEffect Color="Black" Opacity="0.5" Direction="270" ShadowDepth="0.7" />
				</Border.BitmapEffect>
				<Border.Triggers>
					<EventTrigger RoutedEvent="Border.MouseLeave">
						<BeginStoryboard>
							<Storyboard>
								<DoubleAnimation Storyboard.TargetProperty="Opacity" Duration="0:0:0.2" To="0.8"></DoubleAnimation>
							</Storyboard>
						</BeginStoryboard>
					</EventTrigger>
					<EventTrigger RoutedEvent="Border.MouseEnter">
						<BeginStoryboard>
							<Storyboard>
								<DoubleAnimation Storyboard.TargetProperty="Opacity" Duration="0:0:0.2" To="1"></DoubleAnimation>
							</Storyboard>
						</BeginStoryboard>
					</EventTrigger>
				</Border.Triggers>
				<Grid Margin="10" MaxWidth="200">
					<Grid.RowDefinitions>
						<RowDefinition />
						<RowDefinition Height="Auto" />
					</Grid.RowDefinitions>
					<TextBlock x:Name="MessageTextBlock" Text="{Binding Message}" TextWrapping="Wrap" Margin="5" />
					<StackPanel Grid.Row="1" HorizontalAlignment="Stretch">
						<StackPanel Name="loader" HorizontalAlignment="Stretch">
							<Label FontFamily="SegoeUI" FontSize="14">Loading...</Label>
							<Dialogs:LoadIndicator></Dialogs:LoadIndicator>
						</StackPanel>
						
						<!--<Dialogs:AnimatedImage Width="50" Height="50" x:Name="loader" UriSource="Images/loader.gif"></Dialogs:AnimatedImage>-->
						<StackPanel Name="ControlsContainer" Orientation="Horizontal"/>
					</StackPanel>
								
						
				</Grid>
			</Border>
		</Border>
	</Grid>
	
</UserControl>
